package com.house.mapper;


import com.house.entity.House;
import com.house.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author asus
 * @since 2021-02-28
 */

@Mapper
public interface UserMapper  {

    User login(@Param("user") User user);

    Integer register(@Param("user") User user);

    Integer updateUserInfo(@Param("user") User user);

    Integer updatePassword(@Param("username") String username, @Param("password1") String password1, @Param("password2") String password2);

    List<User> getAllUser(@Param("type") Integer type);

    User getUserByUserNameOrId(@Param("username") String username, @Param("id")Integer id);

    Integer updateUserAvatar(@Param("username") String username, @Param("avatar") String avatar);

}
